package com.twu.biblioteca;

import javax.swing.*;

import java.io.*;


public class BibliotecaApp {



    public static void main(String[] args) throws IOException {

        Library library = new Library();

        System.out.println(library.getWelcomeMessage()+ "\n");

        for (int i=0;i<3;i++) {

            System.out.println(library.getOptions()[i]);

        }
        BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
        try{
           int optionSelected = Integer.parseInt(bufferRead.readLine());

            System.out.print(library.selectOption(optionSelected));
        }catch (IOException ioe) {
           System.out.println("Error to read a option");
        }

        BufferedReader bufferRead1 = new BufferedReader(new InputStreamReader(System.in));
        try{
            String bookSelected =bufferRead.readLine();
            System.out.print(library.statusOfReserv(bookSelected));
        }catch (IOException ioe) {
            System.out.println("Error to read a book");
        }

    }

}
